package com.woniuxy.service.impl;

import com.woniuxy.dao.RbacManagerDao1;
import com.woniuxy.entity.RbacManager;
import com.woniuxy.entity.ResponseEntity;
import com.woniuxy.service.RbacManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: wgt
 * Date: 2021/11/28:17:35
 * Description:
 */
@Service
public class RbacManagerImpl implements RbacManagerService {
    @Autowired
    RbacManagerDao1 rbacManagerDao1;
    @Override
    public List<RbacManager> findAll() {
//        PageHelper.startPage();

        List<RbacManager> all = rbacManagerDao1.findAll();
       return all;


    }

    @Override
    public ResponseEntity save(RbacManager rbacManager) {

        int re = rbacManagerDao1.save(rbacManager);
        return new ResponseEntity(200,"新增成功",re);


    }

    @Override
    public ResponseEntity deleteById(int id) {

        int re = rbacManagerDao1.deleteById(id);
        return new ResponseEntity(200,"删除成功",re);
    }

    @Override
    public ResponseEntity update(RbacManager rbacManager) {

        int re = rbacManagerDao1.update(rbacManager);
        return new ResponseEntity(200,"修改成功",re);
    }
}
